
<%@ page import="org.icress.fusion.moc.Tb" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'moc.tb.label', default: 'Tb')}" />
        <title><g:message code="default.list.label" args="['\u5de5\u5355']" /></title>
    </head>
    <body>
        <div class="body">
            <h1><g:message code="default.list.label" args="['\u5de5\u5355']" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
           
            <div class="paginateButtons">
                <g:paginate total="${tbInstanceTotal}" max="100" maxsteps="20"/>
            </div>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                            <g:sortableColumn property="tb001" title="${message(code: 'moc.tb.tb001.label', default: 'Tb001')}" />
                            <g:sortableColumn property="tb010" title="${message(code: 'moc.tb.tb010.label', default: 'Tb010')}" />
                            <g:sortableColumn property="tb002" title="${message(code: 'moc.tb.tb002.label', default: 'Tb002')}"  />
                            <g:sortableColumn property="tb008" title="${message(code: 'moc.tb.tb008.label', default: 'Tb008')}"  />
                            <g:sortableColumn property="tb003" title="${message(code: 'moc.tb.tb003.label', default: 'Tb003')}"  />
                            <g:sortableColumn property="tb011" title="${message(code: 'moc.tb.tb011.label', default: 'Tb011')}"  />
                            <g:sortableColumn property="tb012" title="${message(code: 'moc.tb.tb012.label', default: 'Tb012')}"  />
                            <g:sortableColumn property="tb004" title="${message(code: 'moc.tb.tb004.label', default: 'Tb004')}"  />
                            <g:sortableColumn property="tb005" title="${message(code: 'moc.tb.tb005.label', default: 'Tb005')}"  />
                            <g:sortableColumn property="tb006" title="${message(code: 'moc.tb.tb006.label', default: 'Tb006')}"  />
                            <th><g:message code="moc.tb.tcSum002.label"  default="tcSum002"  /></th>
                            <g:sortableColumn property="beginDate" title="${message(code: 'moc.tb.beginDate.label', default: 'Begin Date')}"  />
                            <g:sortableColumn property="endDate" title="${message(code: 'moc.tb.endDate.label', default: 'End Date')}"  />
                            <th><g:message code="moc.tb.tb009.label"  default="Tb009"  />
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${tbInstanceList}" status="i" var="tbInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        	<!-- 
                            <td><g:link action="show" id="${tbInstance.id}">${fieldValue(bean: tbInstance, field: "id")}</g:link></td>
                            <g:link controller="tb" action="show" id="${tbInstance.id}">${fieldValue(bean: tbInstance, field: "tb001")}</g:link>
                             -->
                        	<td>
                        		<a href="${createLink(controller:'tb', action:'show', id : tbInstance.id)}" target="_blank">${fieldValue(bean: tbInstance, field: "tb001")}</a> 
							</td>
                        	<td>${fieldValue(bean: tbInstance, field: "tb010")}</td>
                        	<td>${fieldValue(bean: tbInstance, field: "tb002")}</td>
                        	<td>${fieldValue(bean: tbInstance, field: "tb008")}</td>
                        	<td>${fieldValue(bean: tbInstance, field: "tb003")}</td>
                        	<td>${fieldValue(bean: tbInstance, field: "tb011")}</td>
                        	<td>${fieldValue(bean: tbInstance, field: "tb012")}</td>
                        	<td>${fieldValue(bean: tbInstance, field: "tb004")}</td>
                        	<td>${fieldValue(bean: tbInstance, field: "tb005")}</td>
                        	<td>${fieldValue(bean: tbInstance, field: "tb006")}</td>
                            <td>${tbInstance.getTcSum002()}</td>
                            <td><g:formatDate format="yyyy-MM-dd" date="${tbInstance.beginDate}" /></td>
                            <td><g:formatDate format="yyyy-MM-dd" date="${tbInstance.endDate}" /></td>
                            <td>${fieldValue(bean: tbInstance, field: "tb009")}</td>
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${tbInstanceTotal}" max="100" maxsteps="20"/>
            </div>
        </div>
    </body>
</html>
